<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>角色管理</title>
<link rel="stylesheet" href="../../easyui/themes/default/easyui.css"
	type="text/css" media="screen" />
<link rel="stylesheet" href="../../easyui/themes/icon.css"
	type="text/css" media="screen" />
<link rel="stylesheet" href="../../css/main.css" type="text/css"
	media="screen" />
<link rel="stylesheet" type="text/css" href="../../css/Tooltip.css" />
<script src="../../easyui/jquery-1.4.4.min.js"></script>
<script src="../../easyui/jquery.easyui.min.js"></script>
<!-- mytab -->
<script src="../../myjs/myTab.js"></script>
<!-- sys -->
<script src="../../myjs/sys.js"></script>
<script src="../../easyui/easyMask.js"></script>
<script src="../../easyui/easyUI.js"></script>
<script src="../../easyui/easyLayer.js"></script>
<script src="../../myjs/roleManager.js"></script>

<!-- validation -->
<script src="../../validation/jquery.bgiframe.min.js"></script>
<script src="../../validation/easy_validator.pack.js"></script>
<script>
var greyLayer ;
		$(function(){
			grid = $('#tt').datagrid({
				url:'/pxglxt/user_priv/getUser_privs',
				pagination:true,
				singleSelect:true,
				fit:true,//表格自动填充
				loadMsg:'正在努力为您加载，请稍作等待…',//加载信息
				toolbar:[{
					text:'新增',
					iconCls:'icon-add',
					handler:'newUser_priv'
				},'-',{
					text:'修改',
					iconCls:'icon-edit',
					handler:'editUser_priv'
					
				},'-',{
					text:'删除',
					iconCls:'icon-remove',
					handler:'delUser_priv'
				},'-',{
					text:'功能分配',
					iconCls:'icon-function',
					handler:'func_roleMenu'
				}]
				
			});
			//初始化pagination工具开始
			var pagetool = $('#tt').datagrid('getPager');
			pagetool.pagination({				
					beforePageText:'第',
					afterPageText:'页，共{pages}页',
					displayMsg:'显示从 {from} 到  {to} , 总记录 {total} '});
			//初始化pagination工具结束
						
		
			$('body').layout();
			$('#btn-save,#btn-cancel').linkbutton();
	//角色管理窗口
				win = $('#user-window').window({
					collapsible:false,
					minimizable:false, 
					maximizable:true, 
					closable:true,
					onClose:function(){greyLayer.close();},
					closed:true,
					cache:false						
			});
			form = win.find('form');	

	//角色功能分配
			win_func = $('#win_function').window({
				collapsible:false,
				minimizable:false, 
				maximizable:false, 
				closable:true,
				onClose:function(){greyLayer.close();},
				closed:true,
				cache:false						
			});	
			form_func = win_func.find('form');	
			greyLayer = new easyMask(null,'100%','100%',100,'#000',8,true);
		});
		
	</script>
</head>
<body>
<div region="center" style="padding: 5px 5px 5px 5px;">
<table id="tt">
	<thead>
		<tr>
			<th field="id" width="100%">角色ID</th>
			<th field="priv_name" width="200%">角色名称</th>
			<th field="priv_desc" width="300%">角色描述</th>

		</tr>
	</thead>
</table>
<!-- 
<div id="win_function" iconCls="icon-function" title="角色功能分配"
	style="width:800px;height: 375px;">
<form id="form_function" name="form_function" method="post">
<table id="tt2">
</table>
</form>
</div> -->
<div id="win_function" iconCls="icon-function" title="角色功能分配"
	style="width: 800px; height: 375px;">
<form id="form_function" name="form_function" method="post">
<table id="tt2" iconCls="icon-edit" idField="id">
	<thead>
		<tr>
			<th field="ck" width="100%"
				editor="{type:'checkbox',options:{on:'已选',off:''}}">已分配</th>
			<th field="sys_menuId" width="100%" sortable=true>主功能序号</th>
			<th field="id" width="100%" sortable=true>功能序号</th>
			<th field="func_name" width="100%">功能名称</th>
			<th field="func_url" width="100%">子功能URL</th>
			<th field="image" width="100%">功能菜单图标</th>
			<th field="tab_name" width="100%">标签菜单名称</th>
			<th field="func_css" width="100%">功能标签CSS</th>
		</tr>
	</thead>
</table>
</form>
</div>
</div>

<div id="user-window" title="角色管理窗口"
	style="width: 420px; height: 400px;">
<div ><!-- style="padding: 5px 5px 10px 20px;" -->
<form id="userForm" name="userForm" method="post">
<table>
	<tr>
		<td>角色名称：</td>
		<td><input name="priv_name" type="text" reg="[\u4e00-\u9fa5]"
			tip="角色名称为中文名称" style="width:260px;"></input></td>
	</tr>
	<tr>
		<td>角色描述：</td>
		<td><textarea name="priv_desc" reg="" tip="角色描述" style="height:150px;width:260px;"></textarea></td>
	</tr>

</table>
</form>

</div>
<div style="text-align: center; padding: 5px;"><a
	href="javascript:void(0)" onclick="saveUser_priv()" id="btn-save"
	icon="icon-save">确定</a> <a href="javascript:void(0)"
	onclick="closeWindow()" id="btn-cancel" icon="icon-cancel">取消</a></div>
</div>
</body>
</html>
